package com.pig4cloud.mall.product.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;


/**
 * 品牌
 *
 * @author fangyu
 * @date 2020-11-25 15:05:29
 */
@Data
@TableName("pms_brand")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "品牌")
public class Brand extends Model<Brand> {
private static final long serialVersionUID = 1L;

    /**
     * 品牌id
     */
    @TableId
    @ApiModelProperty(value="品牌id")
    private Long brandId;
    /**
     * 品牌名
     */
    @ApiModelProperty(value="品牌名")
	@NotBlank(message = "品牌名不可为空")
	private String name;
    /**
     * 品牌logo地址
     */
    @URL(message = "")
    @ApiModelProperty(value="品牌logo地址")
    private String logo;
    /**
     * 介绍
     */
    @ApiModelProperty(value="介绍")
    private String descript;
    /**
     * 显示状态[0-不显示；1-显示]
     */
    @ApiModelProperty(value="显示状态[0-不显示；1-显示]")
    private Integer showStatus;
    /**
     * 检索首字母
     */
//    @Pattern(regexp = "/^[a-zA-Z]$/", message = "必须是一个字母")
    @ApiModelProperty(value="检索首字母")
    private String firstLetter;
    /**
     * 排序
     */
    @Min(value = 0, message = "排序必须大于等于0")
    @ApiModelProperty(value="排序")
    private Integer sort;
}
